<script>
         function controle_Saisie(monFormulaire) 
	   {
            if (monFormulaire.zone.player_input != "") 
		{
	       	alert("Peureux !");
               	return false;
            }
            return true;
         }
</script>


<?php
	$answer = "";
	$counter = 0;
	if($_POST)
	{
		$answer = $_POST['player_input'];
		//$counter = $_POST['
	}	

	$connection = mysql_connect("localhost","root","");
	mysql_select_db("gurumeditation",$connection);
	$query_dev = "select * from devinette where id_devinette=1";
	$result_dev = mysql_query($query_dev,$connection);
	$dev1 = mysql_fetch_object($result_dev);
	
	$query_ind = "select * from indice where id_devinette = $dev1->id_devinette";
	$result_ind = mysql_query($query_ind,$connection);
	
	$i=1;
	echo "<ul>";
	while($ind = mysql_fetch_object($result_ind))
	{
		$query_for = "select * from forme_lexicale where id_forme = $ind->id_forme";
		$result_for = mysql_query($query_for,$connection);
		$forme = mysql_fetch_object($result_for);

		$query_terme = "select * from mot where id_mot = $ind->id_mot";
		$result_terme = mysql_query($query_terme,$connection);
		$terme = mysql_fetch_object($result_terme);

		echo "<li><font color='blue'>ind n.$i -- </font>$forme->forme <b>$terme->mot.</b><br/></li>";
		$i++;
	}
	echo "</ul>";
?>

<html>
	<head> 
		<title> GURU DEV </title> 
	</head>

	<body>
		<td>	
		<form action='play-test.php' method='POST'> 
			<input type='text' name='player_input'>
			<input type ='submit' name='ok'>
		</form>
		</td>
		<?php 
			if($answer)
			{echo "<div> Vous avez repondu: <font color='red'>$answer </div>";} 
		?>
	</body>
</html>